//OP Tails Abilitys By The Minero
//And Discord srb2 guys
//PLEASE CREDIT!
//Mini tutorial,rename all the "tails" spaces.


freeslot ("S_PLAY_ROLLFALL","S_PLAY_ROLLFALL2")
states [S_PLAY_ROLLFALL] = {SPR_PLAY,SPR2_ROLL|FF_ANIMATE,10,nil,5,1,S_PLAY_ROLLFALL2}
states [S_PLAY_ROLLFALL2] = {SPR_PLAY,SPR2_FALL|FF_ANIMATE,20,nil,2,0,S_PLAY_ROLLFALL2}

//BackSpin
addHook ("PlayerThink",function(player)
if player.mo.skin == "knuckles"
and not P_IsObjectOnGround(player.mo)
and not (player.pflags & PF_THOKKED)
and player.cmd.buttons & BT_SPIN

player.mo.state = S_PLAY_ROLL
P_SetObjectMomZ(player.mo,-30*FRACUNIT,true)
P_InstaThrust(player.mo,player.mo.angle,1*FRACUNIT)
player.pflags = $|PF_THOKKED
S_StartSound(player.mo,sfx_spin)
P_SpawnThokMobj(player)
end
end)
